﻿// Copyright 2009 Mike Geise
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Falcon.Core.Domain.Repositories
{
	using System.Collections.Generic;
	using Falcon.Core.Collections;

	public interface IUserMessageRepository
	{
		/// <summary>
		/// Gets the user message by the specified specification.
		/// </summary>
		/// <param name="specification">The <see cref="UserMessageSpecification"/>.</param>
		UserMessage GetBy(UserMessageSpecification specification);

		/// <summary>
		/// Gets the user message by id.
		/// </summary>
		/// <param name="id">The id.</param>
		UserMessage GetById(int id);

		/// <summary>
		/// Gets all the user messages.
		/// </summary>
		IList<UserMessage> GetAll();

		/// <summary>
		/// Gets all the user messages.
		/// </summary>
		/// <param name="specification">The <see cref="UserMessageSpecification"/>.</param>
		IPagedList<UserMessage, UserMessageSpecification> GetPaged(UserMessageSpecification specification);

		/// <summary>
		/// Gets the count of user messages using the specified specification.
		/// </summary>
		/// <param name="specification">The specification.</param>
		/// <returns></returns>
		int Count(UserMessageSpecification specification);

		/// <summary>
		/// Inserts the user message into the storage.
		/// </summary>
		/// <param name="message">The <see cref="UserMessage"/>.</param>
		void Insert(UserMessage message);

		/// <summary>
		/// Updates the specified user message in the storage.
		/// </summary>
		/// <param name="message">The <see cref="UserMessage"/>.</param>
		void Update(UserMessage message);

		/// <summary>
		/// Deletes the specified user message in the storage.
		/// </summary>
		/// <param name="message">The <see cref="UserMessage"/>.</param>
		void Delete(UserMessage message);
	}
}